package cn.itsource.ymcc.controller;

import cn.itsource.ymcc.result.JsonResult;
import cn.itsource.ymcc.service.ICommonService;
import cn.itsource.ymcc.vo.PhoneCodeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class CommonController {

    @Autowired
    private ICommonService commonService;
    @GetMapping("/getImageCode/{imageCodeKey}")
    public JsonResult getImageCode(@PathVariable("imageCodeKey")String key){
        return commonService.getImageCode(key);
    }

    @PostMapping("/sendSmsCode")
    public JsonResult SendSmsCode(@RequestBody PhoneCodeVo phoneCodeVo){
        return commonService.SendSmsCode(phoneCodeVo);
    }
}
